package com.devops.admin.config;

import com.aliyun.teaopenapi.models.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
 * @author jxt
 * @Notes
 * @date 2023/3/16 15:51
 */
@Configuration
public class DingTalkClient {
    @Bean
    @Lazy
    public static com.aliyun.dingtalkim_1_0.Client dingTalkIMClient() throws Exception {
        Config config = new Config();
        config.protocol = "https";
        config.regionId = "central";
        return new com.aliyun.dingtalkim_1_0.Client(config);
    }
    @Bean
    @Lazy
    public static com.aliyun.dingtalkoauth2_1_0.Client dingTalkAuthClient() throws Exception {
        Config config = new Config();
        config.protocol = "https";
        config.regionId = "central";
        return new com.aliyun.dingtalkoauth2_1_0.Client(config);
    }
}
